package aiguigu03.field_method.field.exer1;

/**
 * ClassName: EmployeeTest
 * Package: aiguigu03.field_method
 * Description:
 *
 * @Author ZY
 * @Create 2024/9/22 20:55
 * @Version 1.0
 */
public class EmployeeTest {
    public static void main(String[] args) {
        //创建类的对象（创建类的实例/类的实例化）
        Employee emp1 = new Employee();

        System.out.println(emp1);//地址值

        emp1.id = 1001;
        emp1.name = "tom";
        emp1.age = 24;
        emp1.salary = 7800;

        System.out.println("id = " + emp1.id + ",name = " + emp1.name +
                ",age = " + emp1.age + ",salary = " + emp1.salary);

        //创建Employee的第2个对象
        Employee emp2 = new Employee();
        System.out.println("id = " + emp2.id + ",name = " + emp2.name +
                ",age = " + emp2.age + ",salary = " + emp2.salary);

    }
}
